package com.hantanger.weblog.controller;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.hantanger.weblog.model.Post;


public class HomeController extends BaseController {

	@Override
	public String doGet(HttpServletRequest request, HttpServletResponse response) {
		List<Post> posts = getPostService().getPostsByCategory(-1, 20, System.currentTimeMillis(), true);
		request.setAttribute("posts", posts);
		request.setAttribute("isHomePage", true);
		return "postlist";
	}

}
